package com.googlecode.openauth.entity;

import java.util.UUID;

import org.apache.commons.lang.StringUtils;

public class ResourceInfo {
	private int resId;
	private String uuid;
	private String resName;
	private int resType;
	private String typeName;
	private String typeDesc;
	private String resDesc;
	
	public ResourceInfo() {
		super();
		uuid = UUID.randomUUID().toString();
	}
	public int getResId() {
		return resId;
	}
	public void setResId(int resId) {
		this.resId = resId;
	}
	public String getResName() {
		return resName;
	}
	public void setResName(String resName) {
		this.resName = resName;
	}
	public int getResType() {
		return resType;
	}
	public void setResType(int resType) {
		this.resType = resType;
	}
	public String getResDesc() {
		return resDesc;
	}
	public void setResDesc(String resDesc) {
		this.resDesc = resDesc;
	}
	public String getUuid() {
		return uuid;
	}
	public void setUuid(String uuid) {
		this.uuid = uuid;
	}
	
	public String toString() {
		StringBuilder builder = new StringBuilder();
	
		builder.append(" resId : ");
		builder.append(resId);
		
		if(!StringUtils.isEmpty(uuid)){
			builder.append(" uuid :  ");
			builder.append(uuid);
		}
		
		if(!StringUtils.isEmpty(resName)){
			builder.append(" resName :  ");
			builder.append(resName);
		}
		
		if(!StringUtils.isEmpty(resDesc)){
			builder.append(" resDesc : ");
			builder.append(resDesc);
		}
		
		builder.append(" resType : ");
		builder.append(resType);
		return builder.toString();
	}
	public String getTypeName() {
		return typeName;
	}
	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}
	public String getTypeDesc() {
		return typeDesc;
	}
	public void setTypeDesc(String typeDesc) {
		this.typeDesc = typeDesc;
	}
	
}
